import Vue from 'vue';
import Vuex from 'vuex'
import mutations from "@/store/mutations";
import actions from "@/store/actions";
import getters from "@/store/getters";
//安装插件
Vue.use(Vuex)
//创建Store对象
const store = new Vuex.Store({
  state: {
    cartList: [],//购物车中的商品
  },
  mutations,
  actions,
  getters,
});

//导出，并挂载到Vue实例上(在main.js中)
export default store;
